summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-30 20:59:09 +0100
committerGitHub <noreply@github.com>2023-12-30 20:59:09 +0100
commit09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2 (patch)
treed69a87a9bafa0ce70dacbd9dded354f87ad9708b
parentMerge pull request #12486 from t895/debug-ci (diff)
parentk_capabilities: simplify KTrace map skip logic (diff)
downloadyuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar.gz
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar.bz2
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar.lz
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar.xz
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.tar.zst
yuzu-09bfc852dc0d1f0a01e9a0cd4003d787c5ee07b2.zip
-rw-r--r--src/core/hle/kernel/k_capabilities.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp
index 274fee493..d2288c30d 100644
--- a/src/core/hle/kernel/k_capabilities.cpp
+++ b/src/core/hle/kernel/k_capabilities.cpp
@@ -185,6 +185,10 @@ Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) {
case RegionType::NoMapping:
break;
case RegionType::KernelTraceBuffer:
+ if constexpr (!IsKTraceEnabled) {
+ break;
+ }
+ [[fallthrough]];
case RegionType::OnMemoryBootImage:
case RegionType::DTB:
R_TRY(f(MemoryRegions[static_cast<u32>(type)], perm));
@@ -330,8 +334,6 @@ Result KCapabilities::SetCapabilities(std::span<const u32> caps, KProcessPageTab
// Map the range.
R_TRY(this->MapRange_(cap, size_cap, page_table));
- } else if (GetCapabilityType(cap) == CapabilityType::MapRegion && !IsKTraceEnabled) {
- continue;
} else {
R_TRY(this->SetCapability(cap, set_flags, set_svc, page_table));
}